package com.cicadasmall.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cicadasmall.data.domain.UserConnectionDO;

/**
 * <p>
 * 用户社交账号绑定 服务类
 * </p>
 *
 * @author jin
 * @since 2020-03-27
 */
public interface IUserConnectionService extends IService<UserConnectionDO> {

    UserConnectionDO findByOpenId(String openId, String providerId);

    UserConnectionDO findByOpenIdAndUnionId(String openId, String unionId, String providerId);

    UserConnectionDO findOrSaveByJsCode(String jsCode, boolean createUser) throws Exception;

    UserConnectionDO findOrSaveByCode(String code, boolean createUser) throws Exception;

    UserConnectionDO findUserIdAndProviderId(String openId, String providerId);

}
